﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="persondoc_file_upload.aspx.cs" Inherits="Ccit.OA.PersonDoc.persondoc_file_upload" %>

<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript" language="javascript">
	     function FilterChange()
	     {
	            var oTitle = document.getElementById("tbTitle");
	            var oFile = document.getElementById("MyFile").value;
	            var iPostion = oFile.lastIndexOf("\\");
	            if ( iPostion != -1 )
	            {
	                var oFileName = oFile.substring((iPostion + 1),(oFile.length));
	            }
	            
	            if ( oTitle.value == "")
	               oTitle.value = oFileName;   
	     }
	
    </script>
</head>
<body>
   <Form id="form1" runat="server">
   <table class="tbToolbar" cellpadding="0" cellspacing="0" frame="void" width="98%" align="center">
			<tr>
				<td align="left">
					<div class="tbSeparator"></div>
				</td>
				<td id="Td1" width="100%" runat="server" class="titlebar">
					☆ 上传文件 ☆

				</td>
				<td align="right">
					<div class="tbSeparatorEnd"></div>
				</td>
			</tr>
		</table>
		<table class="tableborder" cellpadding="0" cellspacing="0" border="0" width="98%" align="center">
			<tr id="trTitle" runat=server>
				<td class="pformleft" width="10%" align="center">文件名称</td>
				<td class="pformright" width="90%" align="left">
					<asp:TextBox ID="tbTitle" Runat="server" CssClass="input" Width="98%"></asp:TextBox>
				</td>
			</tr>
			<tr>
				<td class="pformleft" align="center" width="10%"><nobr>附件选择</nobr></td>
				<td class="pformright" width="90%" align="left">
					<input type="file" id="MyFile" onpropertychange="FilterChange()" runat="server" style="WIDTH:98%" />
				</td>
			</tr>
			<tr>
				<td class="pformleft" align="center" width="10%"><nobr>备 注</nobr></td>
				<td class="pformright" width="90%" align="left">
			       <asp:TextBox CssClass="input" ID="txtremark" runat="server" Width="74%" 
                        Height="102px" TextMode="MultiLine"></asp:TextBox>
				</td>
              
			</tr>
			
			<tr class="pformstrip">
				<td align="center" colspan="2">
					<asp:Button id="btnConfirm" CssClass="button" Runat="server" Text="上传" 
                        onclick="btnConfirm_Click"></asp:Button>
					&nbsp;&nbsp;
					<asp:Button ID="btnCancel" CssClass="button" Runat="server" Text="返回" 
                        onclick="btnCancel_Click" Visible="False"></asp:Button>
					&nbsp;&nbsp;
					</td>
			</tr>
		</table>
    </Form>
</body>
</html>
